<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/inc/sessionCheck.jsp" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display"%>
<%@ taglib uri="/WEB-INF/config/tld/fmt.tld" prefix="fmt"%>
<%@ taglib uri="http://ssh.org/selects" prefix="ssh"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
	String applicationPath = basePath + "/" + "application";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
		<link href="<%=path%>/css/jinmu_style.css" rel="stylesheet" type="text/css" />
		<script language="javascript" src="<%=path%>/js/util.js"></script>
		<script type='text/javascript' src='<%=path%>/frame/orgSelect/js/ajaxInitSelect.js'></script>
		<script language="javascript" src="<%=path%>/js/SyncCommon.js"></script>
		<style>
html { overflow-x: hidden; overflow-y: auto; }
</style>
	</head>
	<body>
			<html:form styleId="projectrfpsForm" action="updateProjectrfps.do?method=updateProjectrfps" onsubmit="return save();">
			<html:hidden property="id" value="${projectrfpss.id}"/>
			<html:hidden property="state" value="${projectrfpss.state}"/>
			<input type ="hidden" name="fromModel" value="${projectrfpsForm.fromModel}"/>
			<input type ="hidden" name="worksheetsid" value="0"/>
			<div id="divTree" style="position:absolute; left:1px; top:1px;height=280; width:253px;display:none"></div>
			<table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="margtb5">
			      	<c:choose>
						<c:when test="${projectrfpsForm.fromModel=='approval'}">
							<td align="left" class="padl5 lan12"><img src="<%=path%>/images/img-11.gif" width="12" height="12"/>&nbsp;项目管理 &gt; 立项管理 &gt; 立项信息 &gt; 编辑 </td>			
						</c:when>
						<c:otherwise>
								<td align="left" class="padl5 lan12"><img src="<%=path%>/images/img-11.gif" width="12" height="12"/>&nbsp;项目管理 &gt; 立项管理 &gt; 项目建议书 &gt; 编辑 </td>
						</c:otherwise>
					</c:choose>
			</table>						
			<table cellspacing="0" cellpadding="0" width="98%" align="center"  border="0" class="kuang2 margb5">
				  <tr>
				    <td colspan="4" align="left" class="bkuang zi13b bgcolor2 padl5">项目基本信息</td>
				  </tr>
                    <tr>
                      <td width="18%" align="right" class="brkuang zi13"><bean:message
									key="com.application.projectrfps.entity.projectrfps.createpage.projectname"
									bundle="projectrfps" />：<font color="red">*&nbsp;</font></td>
                         <td colspan="3" align="left" class="bkuang pad2 zi13">
				        <input type="text" flag="true"  maxlength="50" valid="required" errMsg="请输入项目名称！" name="projectname" style="height:18px;" size="76"  value="${projectrfpss.projectname}"/></td>
				  </tr>
                   <tr>
                      <td width="18%" align="right" class="brkuang zi13">起止时间：<font color="red">*&nbsp;</font></td>
                         <td colspan="3" align="left" class="bkuang pad2 zi13">
				        <input type="text" flag="true" readonly="true" valid="required" errMsg="请输入项目开始时间！" name="starttimeStr" readonly="true" value='<bean:write name="projectrfpss" property="starttime" format="yyyy-MM-dd"/>'
									onclick="popUpCalendarDlg(this)" />至
				     <input type="text" flag="true" readonly="true" valid="required |dateValidateEarly" compareName="starttimeStr" value='<bean:write name="projectrfpss" property="endtime" format="yyyy-MM-dd"/>' errMsg="请输入项目结束时间！|项目结束时间不能早于项目开始时间" name="endtimeStr" readonly="true"
									onclick="popUpCalendarDlg(this)" /> </td>
				  </tr>
				  
				   <tr  >
                      <td align="right" class="brkuang zi13"><bean:message
									key="com.application.projectrfps.entity.projectrfps.createpage.projecttype"
									bundle="projectrfps" />：<font color="red">*&nbsp;</font> </td>
				      <td class="brkuang pad2 zi13"><ssh:select propertyName="projecttype" firstShow="N" pid="project_type" type="1" defaultName="${projectrfpss.projecttype}"/></td>
									
					  <td width="18%" align="right" class="brkuang zi13"><bean:message
									key="com.application.projectrfps.entity.projectrfps.createpage.year"
									bundle="projectrfps" />：<font color="red">*&nbsp;</font> </td>
                      <td width="32%" class="brkuang pad2 zi13">
	                      <html:select property="year">
	                      	 <c:forEach var="i" begin="2005" end="2050" step="1"> 
                                   <c:if test="${projectrfpss.year==i }">
                                   		<option value="<c:out value="${i}" />" selected>${i}</option>
                                   </c:if>
                                   <c:if test="${projectrfpss.year!=i }">
                                   		<option value="<c:out value="${i}" />" >${i}</option>
                                   </c:if>
                               </c:forEach>
	                      </html:select>
					 </td>				
			        </tr>
			        
                    <tr>
                      <td width="18%" align="right" class="brkuang zi13"><bean:message
									key="com.application.projectrfps.entity.projectrfps.createpage.principal"
									bundle="projectrfps" />：<font color="red">*&nbsp;</font> </td>
                      <td width="32%" align="left" class="brkuang pad2 zi13">
                      <input type="text" name="principal" id="principal" readonly="true"  value="${projectrfpss.principal}"/><input type="hidden" flag="true"  valid="required" errMsg="请选择项目负责人！" errorTipContent="principal" name="principalid" id="principalid"   value="${projectrfpss.principalid}"/>
                      		<input class="buttonbg" id="sel_department2" type="button" onclick="org_userSelect('<%=path%>','principalid','principal','user','departid','departname')"  value="<bean:message key='com.syc.common.equipment.but_select' bundle="resourceB"/>" name="but_select2" />
                         </td>
                      <td width="18%" align="right" class="brkuang zi13"><bean:message
									key="com.application.projectrfps.entity.projectrfps.createpage.departname"
									bundle="projectrfps" />：<font color="red">*&nbsp;</font></td>
                      <td width="32%" align="left" class="bkuang pad2 zi13"><input type="text" name="departname" id="departname"  readonly="true"   value="${projectrfpss.departname}"/><input type="hidden" flag="true"  errorTipContent="departname" valid="required" errMsg="请选择申报单位！" name="departid" id="departid"   value="${projectrfpss.departid}"/>
                      <input class="buttonbg" id="sel_department" type="button" onclick="org_userSelect('<%=path%>','departid','departname','org')" value="<bean:message key='com.syc.common.equipment.but_select' bundle="resourceB"/>" name="but_select" />	  </td>
                    </tr>
                    <tr>
                      <td align="right" class="brkuang zi13"><bean:message
									key="com.application.projectrfps.entity.projectrfps.createpage.costplanning"
									bundle="projectrfps" />：<font color="red">*&nbsp;</font></td>
                      	<td align="left" colspan="3" class="bkuang pad2 zi13">
                      	 <input type="text" flag="true" maxlength="13"  valid="required|isWanYuan" errMsg="请输入计划费用！|请输入正确的金额！" name="costplanning"  styleClass="text1"  value="<bean:write name ='projectrfpss' property='costplanning'  format='######.######'/>"/>                  
                        </td>
                    </tr>
                    <tr>
                      <td align="right" class="brkuang zi13"><bean:message
									key="com.application.projectrfps.entity.projectrfps.listpage.costStruct"
									bundle="projectrfps" />： </td>
                      <td colspan="3" align="left" class="bkuang pad2 zi13">
                        <textarea name="costStruct"  cols="60" rows="5" flag="true"  valid="limitLength" max="200" errMsg="费用构成输入长度不能超过200个汉字">${projectrfpss.costStruct}</textarea>
                     长度不超过200个字</td>
                    </tr>
                    <tr>
                      <td align="right" class="brkuang zi13"><bean:message
									key="com.application.projectrfps.entity.projectrfps.createpage.background"
									bundle="projectrfps" />：<font color="red">*&nbsp;</font></td>
                      <td colspan="3" align="left" class="bkuang pad2 zi13">
                      <textarea name="background"  cols="60" rows="5" flag="true" valid="required|limitLength" max="200" errMsg="请输入立项背景！|立项背景输入长度不能超过200个汉字">${projectrfpss.background}</textarea>
                      长度不超过200个字
                      </td>
                    </tr>
                    <tr>
                      <td align="right" class="brkuang zi13"><bean:message
									key="com.application.projectrfps.entity.projectrfps.createpage.contents"
									bundle="projectrfps" />：<font color="red">*&nbsp;</font></td>
                      <td colspan="3" align="left" class="bkuang pad2 zi13">
                       <textarea name="contents"  cols="60" rows="5" flag="true"  valid="required|limitLength" max="200" errMsg="请输入研究内容！|研究内容输入长度不能超过200个汉字">${projectrfpss.contents}</textarea>
                       长度不超过200个字
                      </td>
                    </tr>
                    <tr>
                      <td align="right" class="brkuang zi13"><bean:message
									key="com.application.projectrfps.entity.projectrfps.createpage.benefit"
									bundle="projectrfps" />：<font color="red">*&nbsp;</font></td>
                      <td colspan="3" align="left" class="bkuang pad2 zi13">
                       <textarea name="benefit"  cols="60" rows="5" flag="true"  valid="required|limitLength" max="200" errMsg="请输入目标效益！|目标效益输入长度不能超过200个汉字">${projectrfpss.benefit}</textarea>
                       长度不超过200个字
                     </td>
					  </tr>
					  <tr>
                      <td align="right" class="brkuang zi13"><bean:message
									key="com.application.projectrfps.entity.projectrfps.createpage.equipment"
									bundle="projectrfps" />：<font color="red">*&nbsp;</font> </td>
                      <td colspan="3" align="left" class="bkuang pad2 zi13">
                       <textarea name="equipment"  cols="60" rows="5" flag="true"  valid="required|limitLength" max="200" errMsg="请输入需购置的仪器设备！|需购置的仪器设备输入长度不能超过200个汉字">${projectrfpss.equipment}</textarea>
                       长度不超过200个字
                    </td>
                    </tr>
             
                    <tr>
                      <td align="right" class="brkuang zi13"><bean:message
									key="com.application.projectrfps.entity.projectrfps.createpage.remarks"
									bundle="projectrfps" />： </td>
                      <td colspan="3" align="left" class="bkuang pad2 zi13">
                     <textarea name="remarks"  cols="60" rows="5" flag="true"  valid="limitLength" max="200" errMsg="备注输入长度不能超过200个汉字">${projectrfpss.remarks}</textarea>
                       长度不超过200个字</td>
                    </tr>
                  </table>
                  <iframe width="100%" height="150px" onload="this.height=show_attachment.document.body.scrollHeight"
							src="<%=path%>/queryAttachment.do?method=queryAttachment&fid=${projectrfpss.id}&type=40001"
											; scrolling="no" frameborder="0" name="show_attachment"
											id="show_attachment"></iframe>
											
											
				  <table width="100%" border="0" cellspacing="0" cellpadding="0">
				  <tr>
				    <td align="center">
					<input class="buttonbg" id="but_save" type="submit" value="<bean:message key='com.syc.common.projectrfps.save' bundle="projectrfps"/>" name="but_save" />
				  	&nbsp;&nbsp;&nbsp;
				  	<c:if test="${projectrfpsForm.fromModel!='approval'}">
					<input class="buttonbg" id="but_save2" type="button" value="提交审核" onclick="return returnSubmits()"  name="but_save2" />
						&nbsp;&nbsp;&nbsp;
					</c:if>				  	
				  	<input class="buttonbg" id="but_return" type="button" value="<bean:message key='com.syc.common.projectrfps.return' bundle="projectrfps"/>" name="but_return"" onClick="javascript:history.go(-1);"/>
				</tr>
				</table>
		</html:form>
	</body>
</html>


<script>
//提交审核
function returnSubmits(){
	document.forms[0].action="addStartFlow.do?method=addStartFlow&type=update";
	document.forms[0].submit();
}
function save(){
	if(validateForm(document.forms[0],'Y'))
	{
		return true;
		
	}else{
	    return false;
	}
}
</script>





